package top.frsf.rpc.autoconfigure.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author He Kuntao
 * @since 2025/7/7 15:52
 */
@Data
@Component
@ConfigurationProperties(prefix = "rpc")
public class RpcProperties {

    private Registry registry = new Registry();

    private Server server = new Server();

    @Data
    public static class Registry {
        /**
         * 注册中心类型 (redis/zookeeper)
         */
        private String type = "redis";
    }

    @Data
    public static class Server {
        /**
         * 服务端监听端口
         */
        private int port = 8080;
    }
}
